Skip to content

Consolidate extension type registration - #19938

Closed
brandon-b-miller wants to merge 3 commits into
NVIDIA:branch-25.10from
brandon-b-miller:refactor-cudf-import-times
Closed

Consolidate extension type registration#19938
brandon-b-miller wants to merge 3 commits into
NVIDIA:branch-25.10from
brandon-b-miller:refactor-cudf-import-times

Conversation

@brandon-b-miller

Copy link
Copy Markdown
Contributor

As part of investigating #627 and #18868 I moved some code around to make it easier to profile as well as import things in a more natural order. The following is a summary of the changes:

  • Move compile_udf, the only function needed by both the UDF extension framework and the rest of cuDF as well (aggregations, df.query, etc) to a common area with minimal dependencies. This avoids aggregation needing to import the entire extension framework and delays registering the extensions until we hit the groupby part of the import tree
  • moves all the code relevant to masked types to masked_typing.py and masked_lowering.py. This is the high level "scalar" object with a dtype and a null in our UDFs, so it should import what it needs to know about strings from strings_typing.py and strings_lowering.py. This is as opposed to current state where the strings code imports the masked code to define the operations on nullable strings.
  • Creates individual registration functions for each extension and moves the application of numba decorators and registration functions to those parent functions. We now run these upon import as part of a single function.

The motivation of this PR is to put all the numba extension setup work under one function name so it's easier to make sense of how long things are taking at import.

@copy-pr-bot

copy-pr-bot Bot commented Sep 10, 2025

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@vyasr

vyasr commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

I'm going to close this out since we're designing #22884 the right way from the ground up for numba-cuda-mlir and that will eventually replace this approach altogether.

@vyasr vyasr closed this Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants